﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Microsoft.Xna.Framework.Graphics
{
	/// <summary>
	/// Used to set and query effects, and to choose techniques.
	/// </summary>
	public class Effect : GraphicsResource
	{
		private EffectTechnique currentTechnique;
		private EffectParameterCollection pParamCollection;
		private EffectTechniqueCollection pTechniqueCollection;

		#region Properties
		/// <summary>
		/// Gets or sets the active technique.
		/// </summary>
		public EffectTechnique CurrentTechnique
		{
			get { return currentTechnique; }
			set { currentTechnique = value; }
		}

		/// <summary>
		/// Gets a collection of parameters used for this effect.
		/// </summary>
		public EffectParameterCollection Parameters
		{
			get { return pParamCollection; }
		}

		/// <summary>
		/// Gets a collection of techniques that are defined for this effect.
		/// </summary>
		public EffectTechniqueCollection Techniques
		{
			get { return pTechniqueCollection; }
		}
		#endregion

		#region Constructors
		/// <summary>
		/// Creates an instance of this object.
		/// </summary>
		/// <param name="cloneSource">An object to copy.</param>
		protected Effect(Effect cloneSource)
		{
			EffectParameter parameter;
			if (cloneSource == null)
			{
				throw new ArgumentNullException("cloneSource", FrameworkResources.NullNotAllowed);
			}
		}

		/// <summary>
		/// Creates an instance of this object.
		/// </summary>
		/// <param name="graphicsDevice">The device.</param>
		/// <param name="effectCode">The effect code.</param>
		public Effect(GraphicsDevice graphicsDevice, byte[] effectCode)
		{
		}
		#endregion

		/// <summary>
		/// Copies data from an existing object to this object.
		/// </summary>
		public virtual Effect Clone()
		{
			return new Effect(this);
		}
	}
}
